<%@ page contentType="text/html; charset=UTF-8" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%@ taglib prefix="tag" uri="http://www.springframework.org/tags" %>
<html>
    <head>
        <link rel="stylesheet" type="text/css" href="<%= request.getContextPath() %>/views/includes/css/style.css" />
    </head>
<body>
<div id="app-login">
    <h1>Dodaj użytkownika</h1>
<div class="form">
	<form:form commandName="administrator">
	<table>
		<tr>
                    <td><form:label path="username"><tag:message code="addUser.login"/></form:label></td>
                    <td><form:input path="username" />
                        <font color="red"><form:errors path="username" /></font></td>
		</tr>
                <tr>
			<td><form:label path="password"><tag:message code="addUser.password"/></form:label></td> 
			<td><form:password path="password" />
			<font color="red"><form:errors path="password" /></font></td>
		</tr>
		<tr>
			<td><form:label path="repeatedPassword"><tag:message code="addUser.repeatPassword"/></form:label></td> 
			<td><form:password path="repeatedPassword" />
			<font color="red"><form:errors path="repeatedPassword" /></font></td>
		</tr>
        <tr>
            <td><form:label path="accountRole"><tag:message code="addUser.role"/></form:label> 
            <td><form:select path="accountRole" multiple="false">
                    <form:options items="${roles}"/>
                </form:select>
            <font color="red"><form:errors path="accountRole" /></font></td>
        </tr>
			
	</table>
        <input type="submit" />
	</form:form>
</div>
</div>
</body>
</html>